package com.zx.baofu.alcohol.mapper;

import com.zx.baofu.alcohol.model.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository(value = "userMapper")
public interface UserMapper {
    int checkUserUnionId(String unionId);

    int addUser(User user);

    int checkHelp(@Param("helpUnionId") String helpUnionId, @Param("helpedUnionId") String helpedUnionId);

    int updateUserAlcoholNum(@Param("userUnionId") String userUnionId, @Param("alcoholNum") int alcoholNum);

    int addUserHelp(UserHelp userHelp);

    int countHelpedTimes(String unionid);

    int userAlcoholNum(String unionid);

    int updateUserLottery(@Param("unionid") String unionid, @Param("status") int status);

    int userLotteryStatus(String unionid);

    Integer userTotalAlcoholNum(String unionid);

    int countUserOrder(String unionid);

    int lotteryProbability();

    int checkOrderNum(String orderNum);

    int addUserOrder(UserOrder order);

    int addUserLottery(UserLottery userLottery);

    List<User> backUserList(@Param("start") int start, @Param("offset") int offset);

    int countBackUserList();

    Manager manageLogin(String account);

    User getUserInfo(String unionid);

    List<Shop> getShopList();

    List<UserHelp> getHelpRecord(String unionid);

    UserHelp getHelpInfo(String unionid);

    List<AddressArea> getAddressAreaByParentId(Integer parentId);
}
